package br.ucb.tcc.persistencia;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {

	static String CLASS = "com.mysql.jdbc.Driver";
	static String URL = "jdbc:mysql://localhost:3306/twitter";
	static String USER = "root";
	static String PW = "";

	public static Connection getConnection() {

		Connection connection = null;
		try {
			Class.forName(CLASS);
			connection = DriverManager.getConnection(URL, USER, PW);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return connection;
	}

}
